<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>后台管理</title>
    <!-- 引入 WeUI -->
    <link rel="stylesheet" href="https://res.wx.qq.com/open/libs/weui/1.1.2/weui.min.css"/>
    <link rel="stylesheet" href="https://cdn.bootcss.com/jquery-weui/1.2.0/css/jquery-weui.css"/>
    <style type="text/css">
        body, html {
            height: 100%;
            background-color: #f4f4f4;
            -webkit-tap-highlight-color: transparent;
        }

        .margin_top_30px {
            margin-top: 30px;
        }

        footer {
            text-align: center;
            font-size: 14px;
            padding: 20px;
        }

        .weui-loadmore_line .weui-loadmore__tips {
            background-color: #f4f4f4;
        }

        footer a {
            color: #999;
            text-decoration: none;
        }

    </style>
</head>

<body ontouchstart="">

<div id="basic-config" class="weui-cells margin_top_30px">

    <a class="weui-cell weui-cell_access url-data" url-data="/manage/basicConfig" href="javascript:;">
        <div class="weui-cell__hd ">
            <img style="width: 30px;height: 30px;"
                 src=""
                 alt="">
        </div>
        <div class="weui-cell__bd">
            <p>站点设置</p>
        </div>
        <div class="weui-cell__ft"></div>
    </a>

    <a class="weui-cell weui-cell_access url-data" url-data="/user/index" href="javascript:;">
        <div class="weui-cell__hd ">
            <img style="width: 30px;height: 30px;"
                 src=""
                 alt="">
        </div>
        <div class="weui-cell__bd">
            <p>用户管理</p>
        </div>
        <div class="weui-cell__ft"></div>
    </a>


    <a class="weui-cell weui-cell_access url-data" url-data="/group/index" href="javascript:;">
        <div class="weui-cell__hd ">
            <img style="width: 30px;height: 30px;"
                 src=""
                 alt=""></div>
        <div class="weui-cell__bd">
            <p>群组管理</p>
        </div>
        <div class="weui-cell__ft"></div>
    </a>


    <a class="weui-cell weui-cell_access url-data " url-data="/plugin/indexPage" href="javascript:;">
        <div class="weui-cell__hd ">
            <img style="width: 30px;height: 30px;"
                 src=""
                 alt="">
        </div>
        <div class="weui-cell__bd">
            <p>扩展管理</p>
        </div>
        <div class="weui-cell__ft"></div>
    </a>


    <a class="weui-cell weui-cell_access url-data" url-data="/uic/index" href="javascript:;">
        <div class="weui-cell__hd ">
            <img style="width: 30px;height: 30px;"
                 src=""
                 alt="">
        </div>
        <div class="weui-cell__bd">
            <p>邀请码</p>
        </div>
        <div class="weui-cell__ft"></div>
    </a>

    <a class="weui-cell weui-cell_access url-data" url-data="/monitor/index" href="javascript:;">
        <div class="weui-cell__hd ">
            <img style="width: 30px;height: 30px;"
                 src=""
                 alt="">
        </div>
        <div class="weui-cell__bd">
            <p>数据报表</p>
        </div>
        <div class="weui-cell__ft"></div>
    </a>

</div>
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/2.2.4/jquery.js"></script>
<script type="text/javascript" src="https://res.wx.qq.com/open/libs/weuijs/1.1.3/weui.min.js"></script>
<script type="text/javascript" src="https://cdn.bootcss.com/jquery-weui/1.2.0/js/jquery-weui.js"></script>
<script type="text/javascript">
    function getOsType() {
        var u = navigator.userAgent;
        if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1 || u.indexOf('Windows Phone') > -1) {
            return 'Android';
        } else if (u.indexOf('iPhone') > -1) {
            return 'IOS';
        } else {
            return 'PC';
        }
    }

    function reqHtml(reqUri, params) {
        var type = getOsType();
        console.log(type);
        if (type == 'Android') {
            Android.requestPage(reqUri, params);
        } else if (type == 'IOS') {
            ios_requestPage(reqUri, params);
        } else {
            $.toast('暂时不支持该设备');
        }
    }

    function toast(msg) {
        var type = getOsType();
        console.log(type);
        if (type == 'Android') {
            Android.showToast(msg);
        } else if (type == 'IOS') {
            $.toast(msg);
        } else {
            $.toast('暂时不支持该设备');
        }
    }

    $(document).on("click", ".url-data", function () {
        var reqUri = $(this).attr('url-data');
        reqHtml(reqUri, "");
    });
</script>
</body>

</html>